package com.atguigu.study.config;

import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author Marco
 * @Description
 * @date 2025/8/15 22:20
 * @email 3293336923@qq.com
 */
@Configuration
public class LLMConfig {

    @Bean
    public ChatModel    chatModelQWen(){
        return OpenAiChatModel.builder()
                .apiKey(System.getenv("ALIQW"))
                .modelName("qwen-plus")
                .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
                .build();
    }
}
